import React,  {Component} from 'react';

import { Table, Input, InputNumber, Popconfirm, Form ,Select,Button, Row, Col} from 'antd';

import ReactDOM from 'react-dom';
import {connect}  from  'dva'
import ProductTable from '@/components/ProductTable/producttable'
import PageHeaderWrapper from '@/components/PageHeaderWrapper'; //引入面包屑
import styles from './product.less'


@connect(({ tab, loading }) => ({
  tab,
  loading: loading.models.tab,
}))
class   Product extends React.Component {
    constructor(props) {
      super(props);
      this.state={
        protabdata:{}
      }
    }
componentWillReceiveProps(nextProps){
  const {tab } = nextProps;
  this.setState({protabdata:tab.tabdatali})
}
componentDidMount(){
  var obj={
    start_position:1,
    page_size:10
   }
   var { dispatch }=this.props
  dispatch({
    type:'tab/tabdatalist',
    payload: {
      ...obj,
    },
  })
}

    render(){

      return(
        <PageHeaderWrapper title="">  
         <div>
            <ProductTable
              haha={this.state.protabdata}
            />
         </div>
        </PageHeaderWrapper>
      )

    }

}

export default  Product
